﻿Public Class TaskProgress
    Implements IObject

    Dim id As Integer
    Dim taskProgressDate As Date
    Dim startHour As String
    Dim endHour As String
    Dim observations As String
    Dim task As Task
    Dim percentage As Double

    Public Sub New()

    End Sub

    Public Sub New(ByRef task As Task)
        Me.task = task
    End Sub

    Public Sub New(ByVal id As Integer, ByVal taskProgressDate As Date, ByVal startHour As String, ByVal endHour As String, ByVal percentage As Double, ByVal observations As String)
        Me.id = id
        Me.taskProgressDate = taskProgressDate
        Me.startHour = startHour
        Me.endHour = endHour
        Me.observations = observations
        Me.percentage = percentage
    End Sub

    Public Sub New(ByVal id As Integer)
        Me.id = id
    End Sub

    Property idProperty() As Integer
        Get
            Return Me.id
        End Get
        Set(ByVal value As Integer)
            Me.id = value
        End Set
    End Property

    Property taskProgressDateProperty() As Date
        Get
            Return Me.taskProgressDate
        End Get
        Set(ByVal value As Date)
            Me.taskProgressDate = value
        End Set
    End Property

    Property startHourProperty() As String
        Get
            Return Me.startHour
        End Get
        Set(ByVal value As String)
            Me.startHour = value
        End Set
    End Property

    Property endHourProperty() As String
        Get
            Return Me.endHour
        End Get
        Set(ByVal value As String)
            Me.endHour = value
        End Set
    End Property

    Property observationsProperty() As String
        Get
            Return Me.observations
        End Get
        Set(ByVal value As String)
            Me.observations = value
        End Set
    End Property

    Property percentageProperty() As Double
        Get
            Return Me.percentage
        End Get
        Set(ByVal value As Double)
            Me.percentage = value
        End Set
    End Property

    Property taskProperty() As Task
        Get
            Return Me.task
        End Get
        Set(ByVal value As Task)
            Me.task = value
        End Set
    End Property

    Public Function getId() As Integer Implements IObject.getId
        Return id
    End Function

    Public Function getTableName() As String Implements IObject.getTableName
        Return "TASK_PROGRESS"
    End Function
End Class
